<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

function input_date($date)
{
	 $newdate = date("Y-m-d",strtotime($date));
	 if($newdate == "1970-01-01"){
		return null;
	 }else{
		return $newdate;
	 }
}
function input_datetime($date)
{
	 $newdate = date("Y-m-d H:i:s",strtotime($date));
	 if($newdate == "1970-01-01"){
		return null;
	 }else{
		return $newdate;
	 }
}
